﻿using System;
using System.Collections.Generic;
using ParticlePlayground;
using UnityEngine;

// Token: 0x02000144 RID: 324
[Serializable]
public class PlaygroundRecorderData : ScriptableObject
{
	// Token: 0x060006E2 RID: 1762 RVA: 0x00028EB0 File Offset: 0x000270B0
	public virtual void Serialize(List<ParticlePlayground.RecordedFrame> recordedFrames)
	{
		this.version = ParticlePlayground.PlaygroundC.version;
		this.serializedFrames = null;
		this.serializedFrames = new ParticlePlayground.SerializedFrame[recordedFrames.Count];
		for (int i = 0; i < this.serializedFrames.Length; i++)
		{
			this.serializedFrames[i] = recordedFrames[i].CloneAsSerializedFrame();
		}
	}

	// Token: 0x060006E3 RID: 1763 RVA: 0x00028F10 File Offset: 0x00027110
	public virtual void SerializeAsync(List<ParticlePlayground.RecordedFrame> recordedFrames)
	{
		this.version = ParticlePlayground.PlaygroundC.version;
		ParticlePlayground.PlaygroundC.RunAsync(delegate()
		{
			this.serializedFrames = null;
			this.serializedFrames = new ParticlePlayground.SerializedFrame[recordedFrames.Count];
			for (int i = 0; i < this.serializedFrames.Length; i++)
			{
				this.serializedFrames[i] = recordedFrames[i].CloneAsSerializedFrame();
			}
		});
	}

	// Token: 0x060006E4 RID: 1764 RVA: 0x00028F50 File Offset: 0x00027150
	public virtual List<ParticlePlayground.RecordedFrame> CloneAsRecordedFrames()
	{
		if (this.serializedFrames == null)
		{
			return null;
		}
		List<ParticlePlayground.RecordedFrame> list = new List<ParticlePlayground.RecordedFrame>();
		for (int i = 0; i < this.serializedFrames.Length; i++)
		{
			list.Add(this.serializedFrames[i].CloneAsRecordedFrame());
		}
		return list;
	}

	// Token: 0x060006E5 RID: 1765 RVA: 0x00028FA0 File Offset: 0x000271A0
	public virtual void Clear()
	{
		this.serializedFrames = null;
	}

	// Token: 0x060006E6 RID: 1766 RVA: 0x00028FAC File Offset: 0x000271AC
	public static global::PlaygroundRecorderData New()
	{
		return ScriptableObject.CreateInstance<global::PlaygroundRecorderData>();
	}

	// Token: 0x040006F7 RID: 1783
	[HideInInspector]
	public float version;

	// Token: 0x040006F8 RID: 1784
	public ParticlePlayground.SerializedFrame[] serializedFrames;
}
